<template>
  <div>
    <Header></Header>
    <!--路由的出楼 -->
    <router-view></router-view>
    <!-- z在Home 和 Search显示 在登陆和注册时隐藏 -->

    <!-- <Footer v-show="$route.path =='/home'||$route.path=='/search'"></Footer> -->
    <Footer v-show="$route.meta.show"></Footer>
  </div>
</template>

<script>
import Header from "./components/Header/index.vue";
import Footer from "./components/Footer/index";
export default {
  components: {
    Header,
    Footer,
  },
  mounted() {
    // 通知Vue发请求，获取数据，存储于仓库当中
    this.$store.dispatch("categoryList");
  },
};
</script>

<style lang="scss" scoped>
</style>